import Vue from 'vue'
import VueRouter from 'vue-router'
import layout from '@/views/layout'
import home from '@/views/home'
import classify from '@/views/classify'
import shoppingcar from '@/views/shoppingcar'
import mine from '@/views/mine'

Vue.use(VueRouter)

const routes = [
  {
    path: '/layout',
    name: 'layout',
    component: layout,
    children: [
      { path: 'home', name: 'home', component: home },
      { path: 'classify', name: 'classify', component: classify },
      { path: 'shoppingcar', name: 'shoppingcar', component: shoppingcar },
      { path: 'mine', name: 'mine', component: mine }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
